home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Graphics / MysticView / Install < prev    next >
Text File  |  1999-05-29  |  14KB  |  446 lines

  1.  
  2. ;      *** MysticView installation scipt ***
  3.  
  4.  
  5.     ; *** versions ***
  6.  
  7.     (set ver (getversion "MysticView"))
  8.     (set tver (/ ver 65536))
  9.     (set trev (- ver (* tver 65536)))
  10.     (set #MysticVersion (cat tver "." trev))
  11.  
  12.     (set ver (getversion "libs/render.library"))
  13.     (set renderversion (/ ver 65536))
  14.     (set renderrevision (- ver (* renderversion 65536)))
  15.  
  16.     (set ver (getversion "libs/guigfx.library"))
  17.     (set guigfxversion (/ ver 65536))
  18.     (set guigfxrevision (- ver (* guigfxversion 65536)))
  19.  
  20.     (set ver (getversion "libs/mysticview.library"))
  21.     (set mysticlibversion (/ ver 65536))
  22.     (set mysticlibrevision (- ver (* mysticlibversion 65536)))
  23.  
  24.     (set ver (getversion "libs/neuralnet.library"))
  25.     (set neuralnetversion (/ ver 65536))
  26.     (set neuralnetrevision (- ver (* neuralnetversion 65536)))
  27.  
  28.     (set oldrenderversion 0)
  29.     (set oldrenderrevision 0)
  30.     (if (> (exists ("libs:render.library")) 0)
  31.         (
  32.             (set ver (getversion "libs:render.library"))
  33.             (set oldrenderversion (/ ver 65536))
  34.             (set oldrenderrevision (- ver (* oldrenderversion 65536)))
  35.         )
  36.     )
  37.  
  38.     (set oldguigfxversion 0)
  39.     (set oldguigfxrevision 0)
  40.     (if (> (exists ("libs:guigfx.library")) 0)
  41.         (
  42.             (set ver (getversion "libs:guigfx.library"))
  43.             (set oldguigfxversion (/ ver 65536))
  44.             (set oldguigfxrevision (- ver (* oldguigfxversion 65536)))
  45.         )
  46.     )
  47.  
  48.     (set oldmysticlibversion 0)
  49.     (set oldmysticlibrevision 0)
  50.     (if (> (exists ("libs:mysticview.library")) 0)
  51.         (
  52.             (set ver (getversion "libs:mysticview.library"))
  53.             (set oldmysticlibversion (/ ver 65536))
  54.             (set oldmysticlibrevision (- ver (* oldmysticlibversion 65536)))
  55.         )
  56.     )
  57.  
  58.     (set oldneuralnetversion 0)
  59.     (set oldneuralnetrevision 0)
  60.     (if (> (exists ("libs:neuralnet.library")) 0)
  61.         (
  62.             (set ver (getversion "libs:neuralnet.library"))
  63.             (set oldneuralnetversion (/ ver 65536))
  64.             (set oldneuralnetrevision (- ver (* oldneuralnetversion 65536)))
  65.         )
  66.     )
  67.     
  68. ;****************************************************************************
  69. ;
  70. ;    English texts
  71. ;
  72.  
  73.     (if (not (= @language "deutsch"))
  74.         (
  75.             (set #install-msg (cat    "\n\nMysticView installation script.\n\n"
  76.                         "this script will install MysticView " #MysticVersion " to your system.\n\n"
  77.                         "MysticView © 1997-99 by TEK neoscientists\n"))
  78.             
  79.             (set #install-msg2 (cat "\nMysticView is a stand-alone utility, and there is no "
  80.                                     "need for a particular install directory.\n\n"
  81.                                     "MysticView is fully Workbench-integrated, and there is no need for further configuration, when you decide "
  82.                                     "to install it inside the Workbench's search path.\n\n"
  83.                                     "SYS:Utilities/ (without sub-directory) is a good place."))
  84.  
  85.             (set #welcome-msg          "welcome to the MysticView installation process.")
  86.             (set #bad-kick            "you need at least os3.0 (v39) to use this program.")
  87.             (set #bad-cpu            "you need at least a 68020 processor.");
  88.             (set #bad-installer        "you must be using the Installer v43 to install MysticView.")
  89.             (set #ask-prog-dir        "where shall i install MysticView? a drawer won't be created. SYS:Utilities/ is recommended.")
  90.             (set #ask-help-dir        "where shall i install the documentation?")
  91.             (set #copy-msg            "copying files to ")
  92.             (set #install-presets    "do you want to install some sample presets? they might contain some ideas and hints for customizing.")
  93.             (set #install-presets-path    "where do yo want to copy the sample presets to?")
  94.             (set #icon-exists-msg    "an old MysticView icon has been found. many icon tooltypes have changed, or they are no longer supported. it is recommended to discard the old configuration. do you want to overwrite the old icon?")
  95.             (set #library-note        "\nMysticView has been installed successfully.\n\nplease note that obsolete versions of some libraries might be still in use. reboot your system if MysticView complains about missing libraries.")
  96.             (set #choose-default    "some settings of MysticView require a fast hardware and demand large amounts of memory. please choose a configuration that fits to your system.")
  97.             (set #default-default    "hardcoded defaults, passive")
  98.             (set #default-sfs        "slow CPU, few memory, slow graphics")
  99.             (set #default-sff        "slow CPU, few memory, fast graphics")
  100.             (set #default-sms        "slow CPU, much memory, slow graphics")
  101.             (set #default-smf        "slow CPU, much memory, fast graphics")
  102.             (set #default-fms        "fast CPU, much memory, slow graphics")
  103.             (set #default-fmf        "fast CPU, much memory, fast graphics")
  104.             (set #default-all        "you bore me to death. gimme everything.")
  105.             (set #herewego            "\nready for installation.\n\nthis is your last chance to abort. do you want to proceed?")
  106.         )
  107.     )
  108.  
  109. ;****************************************************************************
  110. ;
  111. ;    Deutsche Texte
  112. ;
  113.  
  114.     (if (= @language "deutsch")
  115.         (
  116.             (set #install-msg (cat    "\n\nMysticView installationsskript.\n\n"
  117.                                     "Dieses Skript installiert MysticView " #MysticVersion " auf Deinem System.\n\n"
  118.                                     "MysticView © 1997-99 by TEK neoscientists\n"))
  119.  
  120.             (set #install-msg2 (cat "\nMysticView ist ein einzelnes Programm und benötigt keine "
  121.                                     "weiteren Daten in einem besonderen Untererzeichnis.\n\n"
  122.                                     "Das Programm ist vollständig in die Workbench integriert "
  123.                                     "und bedarf keiner weiteren Konfiguration, wenn Du es im "
  124.                                     "Suchpfad der Workbench installierst.\n\n SYS:Utilities/ "
  125.                                     "(ohne Unterverzeichnis) ist hierfür eine gute Empfehlung.\n\n"))
  126.  
  127.             (set #welcome-msg          "Willkommen zur installation von MysticView")
  128.             (set #bad-kick            "Du benötigst mindestens os 3.0 (v39).")
  129.             (set #bad-cpu            "Du benötigst mindestens einen 68020 Prozessor.");
  130.             (set #bad-installer        "Du benötigst den Installer v43, um MysticView zu installieren.")
  131.             (set #ask-prog-dir        "Wo soll MysticView installiert werden? Ein Verzeichnis wird nicht angelegt. SYS:Utilities/ ist empfohlen.")
  132.             (set #ask-help-dir        "Wohin soll die Anleitung kopiert werden?")
  133.             (set #copy-msg            "kopiere Dateien nach ")
  134.             (set #install-presets    "Willst Du ein paar alternative Beispielkonfigurationen kopieren? Sie enthalten Anregungen für die weitere Anpassung von MysticView an Deine Bedürfnisse.")
  135.             (set #install-presets-path    "Wohin sollen die Beispielkonfigurationen kopiert werden?")
  136.             (set #icon-exists-msg    "Ein altes Piktogramm wurde gefunden. Viele alte Piktogramm-Eigenschaften haben sich geändert oder werden nicht mehr unterstützt. Es ist sehr zu empfehlen, die alte Konfiguration zu löschen. Willst Du das alte Piktogramm überschreiben?")
  137.             (set #library-note        "\nMysticView wurde erfolgreich installiert.\n\nBeachte bitte, daß noch alte Versionen einiger Bibliotheken in Gebrauch sein könnten. Starte Dein System bitte neu, falls sich MysticView über fehlende Bibliotheken beschwert.")
  138.             (set #choose-default    "Einige Einstellungen von MysticView bedürfen einer sehr schnellen Hardware und großer Mengen Speicher. Bitte wähle eine für Dein System geeignete Basiskonfiguration.")
  139.             (set #default-default    "passive Standard-Voreinstellung")
  140.             (set #default-sfs        "langsame CPU, wenig Speicher, langsame Grafik")
  141.             (set #default-sff        "langsame CPU, wenig Speicher, schnelle Grafik")
  142.             (set #default-sms        "langsame CPU, viel Speicher, langsame Grafik")
  143.             (set #default-smf        "langsame CPU, viel Speicher, schnelle Grafik")
  144.             (set #default-fms        "schnelle CPU, viel Speicher, langsame Grafik")
  145.             (set #default-fmf        "schnelle CPU, viel Speicher, schnelle Grafik")
  146.             (set #default-all        "nerv' nicht, gib mir einfach alles. Sofort.")
  147.             (set #herewego            "\nEs kann losgehen.\n\nDies ist Deine letzte Chance, die Installation abzubrechen. Willst Du fortfahren?")
  148.         )
  149.     )
  150.  
  151.  
  152. ;****************************************************************************
  153. ;
  154. ;    installation process
  155. ;
  156.  
  157.  
  158.  
  159.     ; *** Check for Kickstart version ***
  160.  
  161.     (if (< (/ (getversion) 65536) 39)
  162.         ((abort #bad-kick))
  163.     )
  164.  
  165.  
  166.     ; *** Check for Installer-Version ***
  167.  
  168.     (if (< (/ @installer-version 65536) 43)
  169.         ((abort #bad-installer))
  170.     )
  171.  
  172.  
  173.     ; *** Check for CPU ***
  174.  
  175.     (if (patmatch "68000|68010" (database "cpu"))
  176.         (abort #bad-cpu)
  177.     )
  178.  
  179.  
  180.  
  181.  
  182.     ; *** Welcome the user to the installation
  183.  
  184.     (message #install-msg)
  185.  
  186.     (message #install-msg2)
  187.  
  188.  
  189.  
  190.   
  191.     ; *** Ask the user for the destination ***
  192.  
  193.     (set #prog-dest
  194.         (askdir (prompt #ask-prog-dir)
  195.                 (help @askdir-help)
  196.                 (default "SYS:Utilities/")
  197.         )
  198.     )
  199.  
  200.  
  201.     ; *** Check for an already existing icon ***
  202.  
  203.     (set #iconname (tackon #prog-dest "Mysticview.info"))
  204.     (set #iconexists (> (exists #iconname) 0))
  205.  
  206.  
  207.     ; *** Ask the user whether to overwrite the icon ***
  208.  
  209.     (set #copyicon 1)
  210.  
  211.     (if #iconexists
  212.         (
  213.             (set ver (getversion (tackon #prog-dest "MysticView")))
  214.             (set tver (/ ver 65536))
  215.             (set trev (- ver (* tver 65536)))
  216.  
  217.             (if (AND (<= tver 0) (<= trev 99))
  218.                 (
  219.                     (set #copyicon
  220.                         (askbool
  221.                             (prompt #icon-exists-msg)
  222.                             (help @askdir-help)
  223.                         )
  224.                     )
  225.                 )
  226.             )
  227.         )
  228.     )
  229.  
  230.  
  231.     (set #help-dest
  232.         (askdir    (prompt #ask-help-dir)
  233.                 (help @askdir-help)
  234.                 (default #prog-dest)
  235.         )
  236.     )
  237.  
  238.  
  239.     ; *** Ask for the preset installation / path ***
  240.  
  241.     (set #copypresets
  242.         (askbool
  243.             (prompt #install-presets)
  244.             (help @askdir-help)
  245.         )
  246.     )
  247.     
  248.     (if #copypresets
  249.         (set #presets-dest
  250.             (askdir (prompt #install-presets-path)
  251.                     (help @askdir-help)
  252.                     (default "sys:prefs/presets")
  253.             )
  254.         )
  255.     )
  256.  
  257.  
  258.     (if #copyicon
  259.         (set #useconfig
  260.             (askchoice
  261.                 (help @askchoice-help)
  262.                 (prompt #choose-default)
  263.                 (choices
  264.                     #default-default
  265.                     #default-sfs
  266.                     #default-sff
  267.                     #default-sms
  268.                     #default-smf
  269.                     #default-fms
  270.                     #default-fmf
  271.                     #default-all
  272.                 )
  273.                 (default 0)
  274.             )
  275.         )
  276.     )
  277.  
  278.  
  279.  
  280.     (message #herewego)
  281.  
  282.  
  283.  
  284.     ; *** Copy libs ***
  285.  
  286.     (if (> renderversion oldrenderversion)
  287.         (
  288.             (set #render-lib "libs/render.library")
  289.             (if (patmatch "68040" (database "cpu")) (set #render-lib "libs/render.library_68040"))
  290.             (if (patmatch "68060" (database "cpu")) (set #render-lib "libs/render.library_68060"))
  291.     
  292.             (copylib (prompt #copy-msg "LIBS:")
  293.                 (help @copylib-help)
  294.                 (source #render-lib)
  295.                 (dest "LIBS:")
  296.                 (newname "render.library")
  297.             )
  298.         )
  299.     )
  300.  
  301.  
  302.  
  303.     (if (> guigfxversion oldguigfxversion)
  304.         (
  305.             (set #guigfx-lib "libs/guigfx.library")
  306.             (if (patmatch "68881" (database "fpu")) (set #guigfx-lib "libs/guigfx.library_FPU"))
  307.             (if (patmatch "68882" (database "fpu")) (set #guigfx-lib "libs/guigfx.library_FPU"))
  308.             (if (patmatch "68040" (database "cpu")) (set #guigfx-lib "libs/guigfx.library_68040"))
  309.             (if (patmatch "68060" (database "cpu")) (set #guigfx-lib "libs/guigfx.library_68060"))
  310.  
  311.             (copylib (prompt #copy-msg "LIBS:")
  312.                 (help @copylib-help)
  313.                 (source #guigfx-lib)
  314.                 (dest "LIBS:")
  315.                 (newname "guigfx.library")
  316.             )
  317.         )
  318.     )
  319.  
  320.  
  321.     (if (> mysticlibversion oldmysticlibversion)
  322.         (
  323.             (set #mystic-lib "libs/mysticview.library")
  324.             (if (patmatch "68881" (database "fpu")) (set #mystic-lib "libs/mysticview.library_FPU"))
  325.             (if (patmatch "68882" (database "fpu")) (set #mystic-lib "libs/mysticview.library_FPU"))
  326.             (if (patmatch "68040" (database "cpu")) (set #mystic-lib "libs/mysticview.library_FPU"))
  327.             (if (patmatch "68060" (database "cpu")) (set #mystic-lib "libs/mysticview.library_68060"))
  328.  
  329.             (copylib (prompt #copy-msg "LIBS:")
  330.                 (help @copylib-help)
  331.                 (source #mystic-lib)
  332.                 (dest "LIBS:")
  333.                 (newname "mysticview.library")
  334.             )
  335.         )
  336.     )
  337.  
  338.     (if (> neuralnetversion oldneuralnetversion)
  339.         (
  340.             (set #neuralnet-lib "libs/neuralnet.library")
  341.             (if (patmatch "68881" (database "fpu")) (set #neuralnet-lib "libs/neuralnet.library_68040"))
  342.             (if (patmatch "68882" (database "fpu")) (set #neuralnet-lib "libs/neuralnet.library_68040"))
  343.             (if (patmatch "68040" (database "cpu")) (set #neuralnet-lib "libs/neuralnet.library_68040"))
  344.             (if (patmatch "68060" (database "cpu")) (set #neuralnet-lib "libs/neuralnet.library_68040"))
  345.  
  346.             (copylib (prompt #copy-msg "LIBS:")
  347.                 (help @copylib-help)
  348.                 (source #neuralnet-lib)
  349.                 (dest "LIBS:")
  350.                 (newname "neuralnet.library")
  351.             )
  352.         )
  353.     )
  354.  
  355.  
  356.  
  357.     ; *** Copy the program ***
  358.  
  359.     (set #mview "MysticView")
  360.     (if (patmatch "68881" (database "fpu")) (set #mview "MysticView_030FPU"))
  361.     (if (patmatch "68882" (database "fpu")) (set #mview "MysticView_030FPU"))
  362.     (if (patmatch "68040" (database "cpu")) (set #mview "MysticView_68040"))
  363.     (if (patmatch "68060" (database "cpu")) (set #mview "MysticView_68060"))
  364.  
  365.  
  366.     (copyfiles (prompt #copy-msg #prog-dest)
  367.         (help @copyfiles-help)
  368.         (source #mview)
  369.         (dest   #prog-dest)
  370.         (newname "MysticView")
  371.     )
  372.  
  373.     (if #copyicon
  374.         (
  375.             (if (= #useconfig 0) (set #iconname "installicons/MysticView_DEFAULT.info"))
  376.             (if (= #useconfig 1) (set #iconname "installicons/MysticView_SFS.info"))
  377.             (if (= #useconfig 2) (set #iconname "installicons/MysticView_SFF.info"))
  378.             (if (= #useconfig 3) (set #iconname "installicons/MysticView_SMS.info"))
  379.             (if (= #useconfig 4) (set #iconname "installicons/MysticView_SMF.info"))
  380.             (if (= #useconfig 5) (set #iconname "installicons/MysticView_FMS.info"))
  381.             (if (= #useconfig 6) (set #iconname "installicons/MysticView_FMF.info"))
  382.             (if (= #useconfig 7) (set #iconname "installicons/MysticView_ALL.info"))
  383.  
  384.             (copyfiles (prompt #copy-msg #prog-dest)
  385.                 (help @copyfiles-help)
  386.                 (source #iconname)
  387.                 (dest   #prog-dest)
  388.                 (newname "MysticView.info")
  389.             )
  390.         )
  391.     )
  392.  
  393.  
  394.  
  395.     ; *** Copy the help file ***
  396.  
  397.     (copyfiles (prompt #copy-msg #help-dest)
  398.                 (help @copyfiles-help)
  399.                 (source "MysticView.guide")
  400.                 (dest   #help-dest)
  401.                 (infos)
  402.                 (noposition)
  403.     )
  404.  
  405.  
  406.     ; *** Copy example presets ***
  407.  
  408.     (if #copypresets
  409.         (
  410.             (copyfiles (prompt #copy-msg #presets-dest)
  411.                 (help @copyfiles-help)
  412.                 (source "Prefs/Presets/MysticView_Animation")
  413.                 (dest   #presets-dest)
  414.                 (infos)
  415.                 (noposition)
  416.             )
  417.             (copyfiles (prompt #copy-msg #presets-dest)
  418.                 (help @copyfiles-help)
  419.                 (source "Prefs/Presets/MysticView_Fullscreen")
  420.                 (dest   #presets-dest)
  421.                 (infos)
  422.                 (noposition)
  423.             )
  424.             (copyfiles (prompt #copy-msg #presets-dest)
  425.                 (help @copyfiles-help)
  426.                 (source "Prefs/Presets/MysticView_Thumbnails")
  427.                 (dest   #presets-dest)
  428.                 (infos)
  429.                 (noposition)
  430.             )
  431.         )
  432.     )
  433.  
  434.  
  435.  
  436.     ; ** final note
  437.  
  438.     (message #library-note)
  439.  
  440.  
  441.  
  442.     ; ** set return value of installer
  443.  
  444.     (set @default-dest #prog-dest)
  445.  
  446.